$(function(){
    let proId = location.href.split('?')[1].split('=')[1]
    fetch(`http://chst.vip:1234/api/getmoneyctrlproduct?productid=${proId}`).then(response=>{
        return response.json()
    }).then(val=>{
        let val1 = val.result[0]
        console.log(val1);
        console.log(val1.productImg2.match(/[0-9a-zA-Z:/.]+/g)[8]);
        $('main h4').html(val1.productName)
        $('main .other span:eq(0)').html(`${val1.productFrom} | ${val1.productTime}`)
        $('main .other span:eq(1)').html(val1.productTips)
        $('main .content img').attr('src',val1.productImg2.match(/[0-9a-zA-Z:/.]+/g)[8])
        $('main .content span').text(val1.productInfo)   
        $('main .bigimg').attr('src',val1.productImg2.match(/[0-9a-zA-Z:/.]+/g)[8])
        $('main .city').html(val1.productCity)
        $('main .pageimg').attr('src','http://chst.vip:8081/for-stu/wfzh/images/mmbweixin2.png')
    })
    toTop1()
})